#!/bin/bash

if [ $(id -u) = 0 ]
then
   echo "This script must not be run as root" 1>&2
   exit
fi

ROOT_PATH=$(cd $(dirname $0) && pwd);

### Remmina ###

if [ -d "$HOME/.local/share/remmina" ]
then

BAK=$ROOT_PATH/BAK.$(date +%Y%m%d_%H%M%S)/

mkdir -p $BAK
cp -f $ROOT_PATH/*.remmina $BAK
rm $ROOT_PATH/*.remmina

cp -f $HOME/.local/share/remmina/*.remmina $ROOT_PATH/

fi
